﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Class_Work_11_December
{
    class Program
    {
        static void Main(string[] args)
        {
            //Person someone = new Person();
            //someone.firstName = "Vasya";
            //someone.lastName = "Ivanov";
            //someone.Introduce();
            //Person[] persons = new Person[5];
            //persons[0] = someone;
            
            //Employee someone = new Employee();
            //someone.firstName = firstName;
            //someone.lastName = lastName;
            Employee[] employees = new Employee[5];
             for (int i = 0; i < 5; i++)
            {
                Employee newEmployee = new Employee();
                newEmployee.AddEmployeeInfo();
                employees[i] = newEmployee;
            }
            int summOfSalary = 0;
            foreach (var employee in employees)
            {
                summOfSalary += summOfSalary;                    
            }
            Console.WriteLine("Суммарная ЗП {0}", summOfSalary);



        }
    }
    //class Person
    //{
    //    public string firstName;
    //    public string lastName;
    //    public void Introduce()
    //    {
    //        Console.WriteLine("Hello, my name is {0}, {1}", firstName,lastName);
    //        Console.Read();
    //    }
    class Employee
    {
        public string firstName;
        public string lastName;
        public int salary;

        public void PrintInfo()
        {
            Console.WriteLine("Имя сотрудника: {0} {1}", firstName, lastName);
        }

        public void ArrayEmployeeInfo ()
        {
            Console.WriteLine("Введите имя сотрудника");
            firstName = Console.ReadLine();
            Console.WriteLine("Введите фамилию сотрудника");
            lastName = Console.ReadLine();
            Console.WriteLine("Введите ЗП сотрудника за месяц,грн");
            salary = Int32.Parse(Console.ReadLine());
        }

    }
   
            
    
    }


